package com.grj.notification.consumer;

import com.grj.common.model.Order;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class NotificationConsumer {

    @KafkaListener(topics = "inventory-updated", groupId = "notification-service")
    public void handleInventoryUpdated(Order order) {
        System.out.println("📢 [NotificationService] Order " + order.getOrderId() + " completed for user " + order.getUserId());
    }
}
